import service from '../request'

// 获取航迹线
export function getTrackLine() {
  return service({
    url: '/Draw/DrawTrackLine1/geojson',
    method: 'get',
  })
}

export function getTrackLine2() {
  return service({
    url: '/Draw/DrawTrackLine2/geojson',
    method: 'get',
  })
}

// 新增航迹线
export function postAddTrackLine(params) {
  return service({
    url: '/Draw/DrawTrackLine1',
    method: 'post',
    data: params,
  })
}

// 获取直线、测向线
export function getDrawLine1() {
  return service({
    url: '/Draw/DrawLine1/geojson',
    method: 'get',
  })
}

// 新增直线
export function postAddDrawLine1(params) {
  return service({
    url: '/Draw/DrawLine1',
    method: 'post',
    data: params,
  })
}

// 新增测向线
export function postAddDrawDFLine1(params) {
  return service({
    url: '/Draw/DrawDFLine1',
    method: 'post',
    data: params,
  })
}

// 获取折线
export function getDrawLine2() {
  return service({
    url: '/Draw/DrawLine2/geojson',
    method: 'get',
  })
}

// 新增折线
export function postAddDrawLine2(params) {
  return service({
    url: '/Draw/DrawLine2',
    method: 'post',
    data: params,
  })
}

// 更新折线
export function putDrawLine2(params) {
  return service({
    url: `/Draw/DrawLine2/${params.KeyValue}`,
    method: 'put',
    data: params,
  })
}
